<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增操作员')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-operator-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">操作员姓名：</label>
				<div class="col-sm-8">
					<input id="operatorName" name="operatorName" class="form-control" type="text" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">卡号：</label>
				<div class="col-sm-8">
					<input id="operatorCard" name="operatorCard" class="form-control" type="text" required>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">工号：</label>
				<div class="col-sm-8">
					<input id="empNo" name="empNo" class="form-control" type="text" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">初始化权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="autoverifyPermission" name="autoverifyPermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">IQC检验权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="checkPermission" name="checkPermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">合框权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="combinePermission" name="combinePermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">退货权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="returnItemPermission" name="returnItemPermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">品质异常检验权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="qualityCheckPermission" name="qualityCheckPermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">报废权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="scrapPermission" name="scrapPermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">非工单出库权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="manualOutPermission" name="manualOutPermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">子库转移权限：</label>
				<div class="col-sm-8">
					<select class="form-control" id="transferWarehousePermission" name="transferWarehousePermission">
						<option value="1">无</option>
						<option value="2">有</option>
					</select>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/operator"

		$("#form-operator-add").validate({
			onkeyup: false,
			rules:{
				operatorCard:{
					minlength: 2,
					maxlength: 20,
					remote: {
						url: prefix + "/checkOperatorCard",
						type: "post",
						dataType: "json",
						data: {
							"operatorCard" : function() {
								return $.common.trim($("#operatorCard").val());
							}
						},
						dataFilter: function(data, type) {
							return $.validate.unique(data);
						}
					}
				},

			},
			messages: {
				"operatorCard": {
					remote: "当前操作员已存在"
				},

			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/addSave", $('#form-operator-add').serialize());
	        }
	    }

	</script>
</body>
</html>































